import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { LogisticsComlogVO, LogisticsComlogForm, LogisticsComlogQuery } from '@/api/manu/logisticsComlog/types';

/**
 * 查询物流沟通记录列表
 * @param query
 * @returns {*}
 */

export const listLogisticsComlog = (query?: LogisticsComlogQuery): AxiosPromise<LogisticsComlogVO[]> => {
  return request({
    url: '/manu/logisticsComlog/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询物流沟通记录详细
 * @param id
 */
export const getLogisticsComlog = (id: string | number): AxiosPromise<LogisticsComlogVO> => {
  return request({
    url: '/manu/logisticsComlog/' + id,
    method: 'get'
  });
};

/**
 * 新增物流沟通记录
 * @param data
 */
export const addLogisticsComlog = (data: LogisticsComlogForm) => {
  return request({
    url: '/manu/logisticsComlog',
    method: 'post',
    data: data
  });
};

/**
 * 修改物流沟通记录
 * @param data
 */
export const updateLogisticsComlog = (data: LogisticsComlogForm) => {
  return request({
    url: '/manu/logisticsComlog',
    method: 'put',
    data: data
  });
};

/**
 * 删除物流沟通记录
 * @param id
 */
export const delLogisticsComlog = (id: string | number | Array<string | number>) => {
  return request({
    url: '/manu/logisticsComlog/' + id,
    method: 'delete'
  });
};

